<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link href="/zero/resources/dijit/themes/tundra/tundra.css" type="text/css" rel="stylesheet" />
<link href="/zero/resources/styles/standard.css" media="screen" type="text/css" rel="stylesheet" />
<link href="/zero/resources/images/favicon.ico" rel="SHORTCUT ICON" />
<script type="text/javascript">
	var djConfig = {
		parseOnLoad : false,
		isDebug : false,
		locale : 'zh'
	};
</script>
<script type="text/javascript" src="/zero/resources/dojo/dojo.js"></script>
<script type="text/javascript" src="/zero/resources/spring/Spring.js"></script>
<script type="text/javascript" src="/zero/resources/spring/Spring-Dojo.js"></script>
<script type="text/javascript" language="JavaScript">
	dojo.require("dojo.parser");
</script>

</head>
<body>

	<script type="text/javascript">
		dojo.require('dijit.TitlePane');
	</script>
    
	<spring:message code="process.menu.definitions" htmlEscape="false" javaScriptEscape="true" var="panel_title"/>
	
	<div id="_title_fc_com_ibm_zero_domain_task_id">
		<script type="text/javascript">
			Spring.addDecoration(new Spring.ElementDecoration({
				elementId : '_title_fc_com_ibm_zero_domain_task_id',
				widgetType : 'dijit.TitlePane',
				widgetAttrs : {
					title : '${panel_title}',
					open : true
				}
			}));
		</script>
		
	<table>
		<tr>
			<th><spring:message code="process_name" htmlEscape="false" /></th>
			<th><spring:message code="process_version" htmlEscape="false" /></th>
			<th><spring:message code="process_deploy_time" htmlEscape="false" /></th>
			<th></th>
			<th></th>
		</tr>

		<c:forEach items="${processes }" var="process">
			<tr>
				<td><c:out value="${process.name }" /></td>
				<td><c:out value="${process.version }" /></td>
				<td><c:out value="${deployments[process.deploymentId].deploymentTime }" /></td>
				<td>
            		<spring:url value="/process/${process.id }" var="show_form_url" />
					<spring:url value="/resources/images/show.png" var="show_image_url" />
					<spring:message arguments="${process.name }" code="entity_show" var="show_label" htmlEscape="false" />
					<a href="${show_form_url}" title="${fn:escapeXml(show_label)}">
						<img alt="${fn:escapeXml(show_label)}" class="image" src="${show_image_url}" title="${fn:escapeXml(show_label)}" />
					</a>
				</td>
				<td>
					<c:url value="/process/${process.id }" var="start_url" >
						<c:param name="start"></c:param>
					</c:url>
					<spring:url value="/resources/images/add.png" var="add_image_url" />
					<spring:message code="process.start" var="start_label" htmlEscape="false" />
					<form:form action="${start_url }" method="POST">
						<input type="image" class="image" src="${add_image_url }" alt="${fn:escapeXml(start_label) }" title="${fn:escapeXml(start_label) }" value="${fn:escapeXml(start_label) }" />
					</form:form>
				</td>
			</tr>
		</c:forEach>
	</table>
	
	</div>
</body>
</html>